package com.metadata_system.api_server.qt_client_server;

import com.metadata_system.api.annotations.QtClientApiCheck;
import com.metadata_system.common.http.request_dto.LoginUserRequest;
import com.metadata_system.qt_client.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("qtClientServerProject")
@RequestMapping(value = "/api/qt-client-server/v001/Project")
public class ProjectController {
    @Autowired
    private ProjectService projectService;
    @Autowired
    LoginUserRequest loginUserRequest;


    @RequestMapping("/getAllList")
    @Transactional
    @QtClientApiCheck
    public Object getAllList() {
        return projectService.getAllList(loginUserRequest.getTokenUser().decodeID());
    }

}
